package com.object;

import cn.hutool.extra.spring.SpringUtil;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
@MapperScan(basePackages = "com.object.module.*.mapper")
public class LQApplication implements CommandLineRunner {
    public static void main(String[] args) {
        SpringApplication.run(LQApplication.class, args);
    }

    @Override
    public void run(String... args) {
        String active = SpringUtil.getProperty("spring.profiles.active");
        String port = SpringUtil.getProperty("server.port");
        if ("dev".equals(active)) {
            System.out.println("后端启动完成：请求地址:http://localhost:" + port + "/object");
        }
    }
}
